﻿using System;

namespace 红黑树
{
    class Program
    {
        static void Main(string[] args)
        {

            int[] a = { 11, 2, 14, 1, 7, 15, 5, 8 };

            RBTree rbTree = new RBTree();
            foreach (var item in a)
            {
                rbTree.Insert(item);
            }

            rbTree.LayerOrder(rbTree.rootnode);
            rbTree.Insert(4);
            Console.WriteLine();
            Console.WriteLine();
            rbTree.LayerOrder(rbTree.rootnode);
            Console.WriteLine();
            Console.WriteLine();
        }
    }
}
